package com.git.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.git.domain.BaseResponse;

@RestController
public class DemoControllerExchange {
	@Autowired
	private Map<String, DemoController> map;
	public static final String PRE = "demoController_";
	
	@RequestMapping("/a")
	public BaseResponse a(HttpServletRequest request,Integer id,String version){
		
		return this.map.get(DemoControllerExchange.PRE+version).a(request, id);
	}
	@RequestMapping("/b")
	public BaseResponse b(HttpServletRequest request,Integer id,String version){
		
		return this.map.get(DemoControllerExchange.PRE+version).b(request, id);
	}
	@RequestMapping("/c")
	public BaseResponse c(HttpServletRequest request,Integer id,String version){
		
		return this.map.get(DemoControllerExchange.PRE+version).c(request, id);
	}
	@RequestMapping("/d")
	public BaseResponse d(HttpServletRequest request,Integer id,String version){
		
		return this.map.get(DemoControllerExchange.PRE+version).d(request, id);
	}
}
